<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/buy.css" />
	<script src="js/buy.js"></script>
</head>

<body>
	<div id="header-wrap" data-mn=0 data-main=1 data-login=1 data-limit=1 data-begin=1>
		<a href="###" data-link="home" data-type="ico" class="left ico-m ico-home"></a>
		<h2>投资</h2>
		<a href="###" data-link="recharge" data-type="ico" class="right btn b-small b-green">充值</a>
	</div>
	<div class="swiper-container" id="pro-buy">
		<div class="swiper-wrapper">
			<div class="swiper-slide">
				<div class="pb-wrap">
					<div class="pb-g">
						<a href="###" class="show-info ico-m ico-plus" data-type="ico"></a>
						<div class="pbg-wrap">
							<h5>年化收益率</h5>
							<!-- 舍掉小数点后面的 -->
							<b>12<i>%</i></b>
							<span>随存随取</span>
						</div>
						<div class="pb-info">
							<ul class="">
								<li>
									<label>每万份收益</label><b>3.28</b>元
								</li>
								<li>
									<label>结息方式</label>
									日结收益
								</li>
								<li>
									<label>起投份额</label><b>1</b>份
								</li>
								<li>
									<label>当前持有</label><b>0</b>份
								</li>
							</ul>
						</div>
					</div>
					<div class="pb-kc">
						剩余123,084份
					</div>
					<div class="pb-buy">
						<a href="###" data-link="order" class="btn b-red"><span id="check_1">立即抢购</span></a>
					</div>
				</div>
			</div>
			<div class="swiper-slide">
				<div class="pb-wrap" id="tt">
					<div class="pb-g">
						<a href="###" class="show-info ico-m ico-plus" data-type="ico"></a>
						<div class="pbg-wrap">
							<h5>年化收益率</h5>
							<!-- 舍掉小数点后面的 -->
							<b>12<i>%</i></b>
							<span>1月期</span>
						</div>
						<div class="pb-info">
							<ul class="">
								<li>
									<label>预期收益</label><b id="info1">68.87</b>元
								</li>
								<li>
									<label>结息方式</label>
									<span id="info2">日结收益</span>
								</li>
								<li>
									<label>起投份额</label><b id="info3">1</b>份
								</li>
								<li>
									<label>当前持有</label><b id="info4">0</b>份
								</li>
							</ul>
						</div>
					
					</div>
					<div class="pb-kc">
						剩余<b>123084</b>份
					</div>
					<div class="pb-buy">
						<div class="tag-list" data-type="tag" data-limt=1>
							<div class="tl-cont" id="sel_product">
								<a id="d1" href="###" class="chk"><span>1月期</span></a>
								<a id="d2" href="###"><span>3月期</span></a>
								<a id="d3" href="###"><span>6月期</span></a>
								<a id="d4" href="###"><span>12月期</span></a>
							</div>
						</div>
						<a href="###" data-link="order" class="btn b-red"><span id="check_2">立即抢购</span></a>
					</div>
				</div>
			</div>
		</div>
		<div class="pro-tags"></div>
	</div>
	<script>
	$(function(){
		int_kc()
		xg()
		keep()
		var swiper = new Swiper('#pro-buy', {
			pagination: '.pro-tags',
			paginationClickable: true,
			preventClicksPropagation: false,
			paginationBulletRender: function (index,className) {
				//标签的内容，这样传
				var tags_name = "富贵天天,富贵月月";
				var array_tn = tags_name.split(",");
				return '<span class="'+className+'">' + array_tn[index] + '</span>';
			},
			onInit: function(swiper){
				var slide_h = $(window).height()- $("#header-wrap").height()-34;
				$(swiper.wrapper[0]).height(slide_h);
			},
		})
		tag_list()
		
		$(".show-info").on("click",function(){
			$(this).siblings(".pb-info ").toggle(200);
			$(this).toggleClass("si-shut").toggleClass("ico-white")
		})
		change_cont("#tt",8,"1月期",26.88,"月结",1,$.cookie("keep_1"),$.cookie("kc_1"),"btn b-red","立即抢购");
		$("#d1").on("click",function(){
			change_cont("#tt",8,"1月期",26.88,"月结",1,$.cookie("keep_1"),$.cookie("kc_1"),"btn b-red","立即抢购")
		})
		$("#d2").on("click",function(){
			change_cont("#tt",10,"3月期",36.65,"月结",1,$.cookie("keep_3"),$.cookie("kc_3"),"btn b-red","立即抢购")
		})
		$("#d3").on("click",function(){
			change_cont("#tt",12,"6月期",77.89,"月结",1,$.cookie("keep_6"),$.cookie("kc_6"),"btn b-gray","售罄")
		})
		$("#d4").on("click",function(){
			change_cont("#tt",14,"12月期",120.32,"月结",1,$.cookie("keep_12"),$.cookie("kc_12"),"btn b-yellow","还有03:20:32开售")
		});
		$("#check_1,#check_2").on("click",function(){
			if(!$(this).parent(".btn").hasClass("b-red")){
				return false;
			}else{
				if($(this).attr("id") == "check_1"){
					$.cookie("pn_temp","富贵天天");
					$.cookie("ps_temp","随存随取")
				}else{
					$.cookie("pn_temp","富贵月月");
					$.cookie("ps_temp",$("#sel_product").find(".chk").children("span").text())
				}
			}
		})
	})
	</script>	
</body>

</html>
